跳到主要内容

The Beginning of the Road

要了解变量的类型, 使用 typeof

类型推断语句
stringtypeof s === "string"
numbertypeof n === "number"
booleantypeof b === "boolean"
undefinedtypeof undefined === "undefined"
functiontypeof f === "function"
arrayArray.isArray(a)